//
//  Password_Text_Feiled.m
//  ICE_Player
//
//  Created by lijinxin on 12-1-20.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <QuartzCore/QuartzCore.h>
#import "Password_Text_Feiled.h"

@implementation Password_Text_Feiled

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)create_SubViews:(UIViewController*)controller
{
    //self.exclusiveTouch
    [super create_SubViews:controller];
}

- (void)scale_to_fit_iPad
{
    CGRect rect = self.bounds;
    CGPoint pnt = {0};
    /*rect.origin.x = 100.f;
     rect.origin.y = 768.f - 100.f;
     rect.size.width = 1024.f - 100.f - 100.f;
     pnt.x = rect.origin.x + 0.5f * rect.size.width;
     pnt.y = rect.origin.y + 0.5f * rect.size.height;
     self.bounds = rect;
     self.center = pnt;
     */
}

- (void) setHidden:(BOOL)enabled
{
    if (super.hidden == enabled)
    {
        return;
    }
    if (enabled)
    {
        CATransition *animation = [CATransition animation];
        animation.delegate = self;
        animation.duration = 0.25f;
        animation.timingFunction = UIViewAnimationCurveEaseInOut;
        animation.fillMode = kCAFillModeForwards;//kCAFillModeBackwards;//
        animation.type = kCATransitionMoveIn;//@"rippleEffect";//110
        //animation.subtype = kCATransitionFromRight;//kCATransitionFromTop;
        //animation.endProgress = 1.0;
        //animation.removedOnCompletion = NO;
        
        //[self.layer addAnimation:animation forKey:@"animation"];
        [self.layer addAnimation:animation forKey:@"animation"];
        
    }
    else
    {
        CATransition *animation = [CATransition animation];
        animation.delegate = self;
        animation.duration = 0.25f;
        animation.timingFunction = UIViewAnimationCurveEaseInOut;
        animation.fillMode = kCAFillModeForwards;//kCAFillModeBackwards;//
        animation.type = kCATransitionPush;//@"rippleEffect";//110
        //animation.subtype = kCATransitionFromRight;//kCATransitionFromTop;
        //animation.endProgress = 1.0;
        //animation.removedOnCompletion = NO;
        
        //[self.layer addAnimation:animation forKey:@"animation"];
        [self.layer addAnimation:animation forKey:@"animation"];
    }
    
	super.hidden = enabled;
}

- (void)destroy_SubViews
{
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
